package com.sina.shop.service.admin;

import com.sina.shop.core.BaseService;
import com.sina.shop.core.exception.client.DataException;
import com.sina.shop.core.exception.server.CreateException;
import com.sina.shop.core.exception.server.ResourceExistsException;
import com.sina.shop.core.exception.server.UpdateException;
import com.sina.shop.domain.admin.Admin;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * 段浩杰   2018-02-06-9:55
 */
public interface AdminService extends BaseService {

    //根据账户查找用户
    Admin getAdminByAccount(String account);

    Admin getAdmin(String account);

    //保存用户
    Admin saveAdmin(Admin admin) throws CreateException, ResourceExistsException, DataException;

    //更新用户
    Admin updateAdmin(Admin admin) throws UpdateException, DataException;
}
